﻿
using Chain.BLL;
using System;
using System.Data;
using System.Text;
using System.Text.RegularExpressions;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;

    public partial class ActivityLog : Page
    {
      

        protected void Page_Load(object sender, EventArgs e)
        {
            if ((base.Request.Cookies["uid"] != null) && Regex.IsMatch(base.Request.Cookies["uid"].Value, @"^\d+$"))
            {
                int MemID = Convert.ToInt32(base.Request["uid"]);
                  StringBuilder builder = new StringBuilder();
                builder.Append(" select datetime,b.name,a.moeny,a.score,PresentsName ");
                  builder.Append(" from Mem_Activity as a left join Activity as b ");
                  builder.Append(" on a.ActivityID=b.ID");
                  builder.Append(" where MemID="+MemID.ToString());
                  builder.Append(" order by datetime desc");











                  DataTable dt = Chain.DBUtility.DbHelperSQL.Query(builder.ToString()).Tables[0];

                  this.rptActivityLog.DataSource = dt;
                this.rptActivityLog.DataBind();
                if (dt.Rows.Count == 0)
                {
                    this.msg.Style.Add("display", "");
                }
            }
        }
    }


